<#assign category_orl = param.value('category_orl')?if_exists>
<#assign sch_type = param.value('sch_type')?if_exists>
<#assign sch_value = param.value('sch_value')?if_exists>

<script type="text/javascript">//<![CDATA[

jQuery(function() {

  <#if MM.options_is_category?if_exists == 'Y'>
  // 카테고리 호출 listCategory 도 같이 사용할 수 있음
  jQuery.category.select_box('#category_orl','${MODULE_ORL}','${category_orl}');
  </#if>


  jQuery.ja.setValue('#form_search #sch_type','${sch_type}');
  jQuery.ja.setValue('#form #category_orl','${category_orl}');

  // parameter input create
  jQuery.jaAction.paramCreateInput('#form_search','${param.get('?')?js_string}');

  jQuery('#category_orl').change(function() {
    location.href="dispDocumentList.me${param.get('?category_orl=')?js_string}&category_orl=" + jQuery(this).val();
  });

});

//]]></script>

<div id="sub_column_content">
<#include "admin.sub.html">
<#include "_head.html">

  <form id="form" method="get" action="?">

    <div class="document-list">
      <div class="fixed_img_head">Total ${paging.total_count?string(",###")} Page ${paging.page?string(",###")}/${paging.total_page?string(",###")}
        <ul>
          <#if MM.options_is_category == 'Y'>
          <li>
            <select name="category_orl" id="category_orl">
              <option value="">전체</option>
            </select>
          </li>
          </#if>
          <li><a href="./dispDocumentList.me${param.get('?list_style=list')?html}"><span class="iconset style_list"></span></a></li>
          <li><a href="./dispDocumentList.me${param.get('?list_style=gallery')?html}"><span class="iconset style_gallery"></span></a></li>
        </ul>
      </div>
      <div class="fixed_img_col">
        <ul>
        <#list O.listDocument as obj>
        <#assign thumbnail = daoFile.getFileOnce(MODULE_ORL,"1",obj.document_orl,"image")?if_exists>
        <li>
          <a href="./dispDocumentView.me${param.get('?document_orl=${obj.document_orl}')?html}"><span class="thumb"><#if thumbnail != ''><img src="${thumbnail}" width="100" height="100" /><#else>No Image</#if><#if MM.options_is_category == 'Y'><em>${obj.category_title}</em><#else><em>&nbsp;</em></#if></span> <strong>${obj.title}</strong></a>
          <p><#if obj.regdate != ""><#assign regdate = obj.regdate?datetime("yyyyMMddHHmmss")>${regdate?string("yyyy/MM/dd")}</#if></p>
          <p>${obj.nickname}</p>
        </li>
        </#list>
        <#if paging.total_count == 0>
        <li class="zero">등록된 자료가 없습니다.</li>
        </#if>
        </ul>
      </div>

    </div>
  </form>

  <div class="document-foot-menu">
    <#if MEI_GRANT_WRITE>
    <span class="button medium"><a href="./dispDocumentInsert.me${param.get('?')?html}">등록</a></span>
    </#if>
  </div>

  <@pagenavigator url = param.get('?page=')?j_string form="#form" params = paging />
  </form>

  <div class="document-search tc">
  <form id="form_search" method="get" action="?">
    <fieldset>
        <select id="sch_type" name="sch_type">
          <option value="">검색</option>
          <option value="title">제목</option>
          <option value="content_text">내용</option>
        </select>
       <input type="text" class="i_search w200" id="sch_value" name="sch_value" value="${param.value('sch_value')?if_exists?html}" />
       <span class="button medium"><input type="submit" value="검색" /></span>
    </fieldset>
  </form>
  </div>

<#include "_foot.html">
</div>
